#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int fun(int n)
{
	int i = 1;
	int j = 1;
	int k = 0;
	int m = 0;
	if (n <= 2)
	{
		return 1;
	}
	else
	{
		for (k = 2;k < n;k++)
		{
			m = i+j;
			i = j;
			j = m;
		}
	}
	return m;
}
int main()
{
	int n = 0;
	scanf("%d",&n);
	printf("%d", fun(n));
	return 0;
}
